<template>
  <div>
    <p class="text-red-500">广播功能仅专业版支持</p>
    <div class="pr-16">
      <el-input v-model="content" placeholder="请输入内容"></el-input>
      <div class="mt-6 text-center">
        <el-button type="primary" class="mt-6 px-6" @click="send"
          >发送</el-button
        >
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      content: "",
    };
  },
  computed: {},
  methods: {
    send() {
      const content = this.content.trim();
      if (!content) return;
      this.axios
        .post("message/broadcast", {
          content: this.content,
        })
        .then((res) => {
          if (res.retCode != 0) {
            return this.$message.error(res.retMsg);
          }
          this.$message.success("操作成功!");
          this.content = "";
        });
    },
  },
};
</script>

<style>
</style>